package cn.wusifx.zabbix.request.builder.action;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/action/update
 */
public class ActionUpdateRequestBuilder extends UpdateRequestBuilder {
    private String actionId;

    public ActionUpdateRequestBuilder(Long id,String auth){
        super("action.update",id,auth);
    }

    public ActionUpdateRequestBuilder(String auth){
        super("action.update",auth);
    }

    public String getActionId() {
        return actionId;
    }

    public ActionUpdateRequestBuilder setActionId(String actionId) {
        this.actionId = actionId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("actionid",actionId);
        return baseRequest;
    }
}
